<template>
	你好 这是登录界面！
	<input type='text' placeholder="账号" v-model.trim="username">
	<input type='text' placeholder="密码" :prefix-icon='search' v-model.trim="password">
	<button @click="submit" :disable="buttonstatus">登录</button>
</template>

<script setup>
	import HelloWorld from '../components/HelloWorld.vue'
	import router from '../router'
	import request from '../api'
	import {watch ,ref } from 'vue'
	const buttonstatus=ref(false)
	const username=ref('')
	const password=ref('')	
	const submit=()=>{
		router.replace('/')
	
	}
	watch([username.value,password.value],(newVal)=>{
		console.log(newVal)
		if (newVal[0]!=newVal[1])//&&(newVal[0]!="")&&(newVal[1]!="")
		{
			buttonstatus.value=true
		}else{
			buttonstatus.value=false	
		}
	})
</script>

<style>
</style>